package com.boyu.common.config;

import com.boyu.common.SystemConst;
import com.boyu.common.interceptor.ContextInterceptor;
import com.boyu.front.ArticleController;
import com.boyu.front.OrderController;
import com.boyu.front.ProductController;
import com.boyu.front.FrontUserController;
import com.boyu.front.index.IndexController;
import com.jfinal.config.Routes;

/**
 * Created by legend9999 on 2016/8/28.
 */
public class FrontRoutes extends Routes {
    public static final String FRONT = "";

    public void config() {
        addInterceptor(new ContextInterceptor());
        setBaseViewPath("/WEB-INF/views/front");
        add("/", IndexController.class,FRONT);
        add(FRONT + "/" + SystemConst.ROUTER_PRODUCT, ProductController.class,"product");
        add(FRONT + "/" + SystemConst.ROUTER_ARTICLE, ArticleController.class,"article");
        add(FRONT + "/" + SystemConst.ROUTER_FRONT_USER, FrontUserController.class,"fuser");
        add(FRONT + "/" + SystemConst.ROUTER_FRONT_ORDER, OrderController.class,"order");
    }
}

